package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import com.heima.user.service.ApUserAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
public class ApUserAuthController {
    @Autowired
    private ApUserAuthService apUserAuthService;

    //分页查询列表
     @PostMapping("/list")
        public ResponseResult page(@RequestBody ApUserRealnameDto dto) {
            return apUserAuthService.page(dto);
        }

        //审核成功
        @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto) {
        return apUserAuthService.authPass(dto);
    }
    //审核失败
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto) {
        return apUserAuthService.authFail(dto);
    }
}